#include <iostream>
#include <clog/logger.hpp>
#include <clog/log_manager.hpp>

int main() {
    // Initialize the log manager with the current process name
    LogManager logManager;
    logManager.init("example_process");

    // Create a logger instance
    Logger logger;

    // Set the log level
    logger.setLogLevel(LogLevel::DEBUG);

    // Log messages of various levels
    logger.log(LogLevel::INFO, "This is an info message.");
    logger.log(LogLevel::DEBUG, "This is a debug message.");
    logger.log(LogLevel::WARNING, "This is a warning message.");
    logger.log(LogLevel::ERROR, "This is an error message.");

    // Simulate some processing
    for (int i = 0; i < 5; ++i) {
        logger.log(LogLevel::INFO, "Processing item " + std::to_string(i));
    }

    // Roll the log if needed
    logManager.rollLogIfNeeded();

    return 0;
}